package com.example.bishe.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.example.bishe.entity.User;
import com.baomidou.mybatisplus.extension.service.IService;
import com.example.bishe.web.b.vo.getUserPageVO;

import java.util.List;

/**
 * <p>
 *  用户服务类
 * </p>
 *
 * @author LDH
 * @since 2022/11/30
 */
public interface UserService extends IService<User> {

    /**
    * 功能描述: 用户登录
    *
    * @Author: LDH
    * @Date: 2023/04/16
    */
    User login(String openId);

    /**
     * @Description: 用户分页查询
     *
     * @Author: LDH
     * @Date: 2023/02/05
     */
    IPage<getUserPageVO> userPage(int pageNum, int pageSize, Long id, String name, String startTime, String endTime, String state, Integer roomNum);

    /**
     * @Description: 用户启用
     *
     * @Author: LDH
     * @Date: 2023/02/05
     */
    void setON(Long id);

    /**
     * @Description: 用户禁用
     *
     * @Author: LDH
     * @Date: 2023/02/05
     */
    void setOFF(Long id);

    /**
     * @Description: 单个删除用户
     *
     * @Author: LDH
     * @Date: 2023/02/05
     */
    void deleteOne(Long id);

    /**
    * 功能描述: 批量删除用户
    *
    * @Author: LDH
    * @Date: 2023/05/09
    */
    void deleteBatch(List<User> users);

    /**
    * 功能描述: 修改用户头像以及昵称
    *
    * @Author: LDH
    * @Date: 2023/04/16
    */
    User updateByAuth(Long id, String avator, String nikname);
}
